import { createRouter, createWebHistory } from 'vue-router'

// 导入组件
import Ai from '../pages/Ai/index.vue'
import Login from '../pages/login/index.vue'

// 定义路由
const routes = [
  {
    path: '/',
    component: Login,
    name: 'Index',
    meta: { title: '首页', affix: true }
  },
  {
    path: '/Ai',
    name: 'Ai',
    component: Ai
  },

]

// 创建路由实例
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
